"""
GConf Importer 
Copyright (c) 2006 Peter Moberg <moberg.peter@gmail.com>

This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.

This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
GNU General Public License for more details.

You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA

On Debian systems, the complete text of the GNU General Public
License can be found in /usr/share/common-licenses/GPL file.
"""

import gconf
import layout_file
import gconf_import
import gconf_dump

dirs = ["/apps/panel/applets", "/apps/panel/objects", "/apps/panel/toplevels"]
singleKeys = ["/apps/panel/general/applet_id_list", "/apps/panel/general/object_id_list", "/apps/panel/general/toplevel_id_list"]

#dirs = [ "/apps/test" ]
#singleKeys = []

client = gconf.client_get_default()
gconfDump = gconf_dump.GConfDump(client)
xml = gconfDump.dump(dirs, singleKeys)

print "----------------------------------------------"
print xml
print "----------------------------------------------"

gconfImport = gconf_import.GConfImport(client)
gconfImport.importXml( xml, dirs )



#layoutFile = layout_file.LayoutFile("My layout", "I like it this way", client)
#layoutFile.save()


"""
To be dumped:
/apps/panel/applets 
/apps/panel/objects 
/apps/panel/toplevels 
/apps/panel/general/applet_id_list 
/apps/panel/general/object_id_list 
/apps/panel/general/toplevel_id_list 

(there might be some other keys that should be saved in /apps/panel/global
"""
